#include "udp_server.hpp"
#include <memory>

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        std::cout << "Wrong use\n";
        std::cout << "Usage: ./udp_server port\n";
        exit(-2);
    }
    uint16_t server_port = atoi(argv[1]);
    std::unique_ptr<mynet::UdpServer> usvr(new mynet::UdpServer(server_port));
    usvr->init_server();
    usvr->start_server();
    return 0;
}